<template>
	<view class="content">
		<view class="container">
			<view class="logo-img">
				<image src="@/static/lg.png" mode=""></image>
			</view>
		</view>
		<view class="button_box bt1" @click="goPage('s')">
			<!-- <button type="button" color="d9d9d9" @click="goPage('s')"></button> -->
			手机号一键登录
		</view>
		<view class="button_box bt2" @click="goPage('d')">
			<!-- <button type="button" color="d9d9d9" @click="goPage('d')"></button> -->
			短信验证码登录
		</view>
		<view class="flex check_box">
			<u-checkbox-group v-model="check" placement="column" @change="checkboxChange">
				<u-checkbox name="确认" label="我已阅读用户协议..." size="40" labelSize="25" shape="circle" labelColor="#000"
					icon-size="40">
				</u-checkbox>
			</u-checkbox-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				check: []
			}
		},
		methods: {
			checkboxChange(n) {
				this.check = n.length ? true : false
				// console.log('change', this.check,n);
			},
			goPage(value) {
				if (value == 's') {
					uni.navigateTo({
						url: "/subpack/login/phoneLogin"
					})
				} else {
					uni.navigateTo({
						url: "/subpack/login/msgLogin"
					})

				}
			}
		},
		onLoad(opt) {
			uni.showToast({
				title: opt.msg,
				icon: 'error'
			})
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		position: relative;
		background: linear-gradient(to bottom right, #CEEE5B, .03%, #fff);
		height: 100vh;

		.container {
			display: flex;
			justify-content: center;
			align-items: center;
			padding-top: 200rpx;

			.logo-img {
				width: 300rpx;
				height: 300rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}

		.button_box {
			width: 75%;
			margin: 40rpx auto;
			border-radius: 50rpx;
			height: 100rpx;
			line-height: 100rpx;
			font-size: 30rpx;
			text-align: center;

			.text {
				font-size: 27rpx;
			}
		}

		.bt1 {
			background-color: #2B2B2B;
			color: #fff;
		}

		.bt2 {
			background-color: $uni-color-primary;
			color: #000;
		}

		.check_box {
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}

	.mt-30 {
		margin-top: 40rpx;
	}
</style>